using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Interactivity;
using Avalonia.Markup.Xaml;
using System;

namespace 畜牧业审核程序国产;

public partial class FloatingSubmitWindow : Window
{
    public FloatingSubmitWindow()
    {
        InitializeComponent();

#if DEBUG
        this.AttachDevTools();
#endif
        // 设置窗口为无边框（可选）
       
        // 让窗口始终保持在最前
        this.Topmost = true;

        // 添加鼠标按下事件处理，用于实现拖动窗口功能
       
       // this.AddHandler(PointerPressedEvent, (sender, args) => BeginMoveDrag(args), true);
       this.PointerPressed += Window_Pressed;
    }

    private void Window_Pressed(object? sender, PointerPressedEventArgs e)
    {
        this.BeginMoveDrag(e);
    }
}